﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Configurations
{

    public class ScheduleManager:ConfigurationManager<Schedule>//
    {
        public Schedule IsTime(string time)//
        {
            Schedule schedule = new Schedule();
            if (time != null)
            {
                schedule.Time = time;
                return schedule;
            }
            else
            {
                return null;
            }
            //if (schedule.Time == time)
            //{
            //    return true;
            //}
            //else
            //{
            //    return false;
            //}
        }

        public ScheduleManager()
        {
            this.XmlFile = @"C:\WorkSpace\PFM-Schedule.XML";
        }

        public Schedule IsInterval(string interval)
        {
            Schedule schedule = new Schedule();


            if (interval == "EveryDay")
            {
                schedule.Interval = interval;
                return schedule;
            }
            else if (interval == "Monday")
            {
                schedule.Interval = interval;
                return schedule;
            }
            else
            {
                return null;
            }

        }
    }
}



